dt_config_aoColumns = [ 
	       {
	    	   "sTitle" : "Campaign Name",
	    	   "mData" : "CAMPAIGN_NAME"
//	    			   ,"sClass": "indexLeft",
	       }, 
        {
			"sTitle" : "Campaign ID",
			"mData" : "ID",
			"bVisible" : false
		}, 
		{
			"sTitle" : "Reason Code",
			"mData" : "REASON_CODE",
			sWidth: "100px",
			"mRender" : function(data, type, row) {
				if(data === null){
					return  '';
				}
				return data;
			}
		}, {
			"sTitle" : "Analytics Link",
			"mData" : "ANALYTICS_LINK",
			"mRender" : function(data, type, row) {
				if(data === null){
					return  '';
				}
				return "<a href='" + data + "'>" + "Link" + "</a>";
			},
			"sDefaultContent": ""
		}, {
			"sTitle" : "Campaign Start Date",
			"mData" : "START_DATE",
			"sDefaultContent": ""
		}, {
			"sTitle" : "Campaign End Date",
			"mData" : "END_DATE",
			"sDefaultContent": ""
		}, {
			"sTitle" : "Campaign Description",
			"mData" : "DESCRIPTION",
//			"sDefaultContent": ""
		},{
			"sTitle" : "Variable",
			"mData" : "VARIABLE",
			"sDefaultContent": ""
		}, {
			"sTitle" : "Cost per Variable",
			"mData" : "COST_PER_VARIABLE",
			"sDefaultContent": ""
		}, {
			"sTitle" : "Fix Costs",
			"mData" : "FIX_COSTS",
			"sDefaultContent": ""
		}, {
			"sTitle" : "Total Costs",
			"mData" : "TOTAL_COSTS",
			"sDefaultContent": ""
		}, {
			"sTitle" : "Promocode",
			"mData" : "Pro_CodeName",
			"sDefaultContent": ""
		}, {
			"sTitle" : "Promocode ID",
			"mData" : "Pro_Id",
			"sDefaultContent": ""
		}, {
			"sTitle" : "Pro_Zuordnung",
			"mData" : "Pro_Zuordnung",
			"sDefaultContent": ""
		}, {
			"sTitle" : "Pro_Type",
			"mData" : "Pro_Type",
			"sDefaultContent": ""
		}, {
			"sTitle" : "Pro_StartDate",
			"mData" : "Pro_StartDate",
			"sDefaultContent": ""
		}, {
			"sTitle" : "Pro_EndDate",
			"mData" : "Pro_EndDate",
			"sDefaultContent": ""
		}, {
			"sTitle" : "Pro_Nutzniesser",
			"mData" : "Pro_Nutzniesser",
			"sDefaultContent": ""
		}, {
			"sTitle" : "Pro_ValueProvided",
			"mData" : "Pro_ValueProvided",
			"sDefaultContent": ""
		}, {
			"sTitle" : "Pro_ValueType",
			"mData" : "Pro_ValueType",
			"sDefaultContent": ""
		} ];


$(document).ready(function() {
	oTable = $('#example').dataTable({
//		"sDom" : 'C<"clear">lfrtip',
//		"sDom" : 'T<"clear">lfrtip',
//		 "sDom" :
//		 "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",
		"sDom": "<'row-fluid'<'span6'T><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
//		"oColVis" : {
//			"activate" : "mouseover",
//			"buttonText" : "Change columns",
//			"bRestore" : true,
//			"sAlign" : "left"
////				,"aiExclude": [ 0 ]
//		},
//		"sDom": 'C<"clear">lfrtip',  //zur Filterung der einzelnen Spalten
//		 "fnDrawCallback": function (o) {

//		 var nColVis = $('div.ColVis', o.nTableWrapper)[0];
//		 nColVis.style.width = 100+"px";
//		 },
		"sScrollX": "100%",
		"sScrollXInner": "200%",
		"bScrollCollapse" : true,
		"bPaginate" : true,
		"bLengthChange" : true,
		"bFilter" : true,
		"bSort" : true,
		"bSortable" : true,
		"bSearchable" : true,
		"bInfo" : false,
		"bAutoWidth" : true,
		"bProcessing" : true,
		"bServerSide" : false,
		"oTableTools" : {
			"sRowSelect" : "single",
			"aButtons" : [
			// "copy",
			// "print",
			// {
			// "sExtends": "collection",
			// "sButtonText": "Save",
			// "aButtons": [ "csv", "xls", "pdf" ]
			// },
			{
				"sExtends" : "editor_create",
				"editor" : editor
			}, {
				"sExtends" : "editor_edit",
				"editor" : editor
			}, {
				"sExtends" : "editor_remove",
				"editor" : editor
			} ]
		},
		// "sAjaxSource" : 'resources/mocks/arrays.txt',
		"sAjaxSource" : 'campaigns',
		"bStateSave" : false,
		"aoColumns" : dt_config_aoColumns,
	});
	
//	 new FixedColumns( oTable, {
//		 "iLeftWidth": 200
//	 } );

});
